import { createHtmlPlugin } from 'vite-plugin-html'

import dayjs from 'dayjs'

export default function () {
  return createHtmlPlugin({
    minify: false,
    pages: [
      {
        filename: 'index.html',
        template: 'index.html',
        injectOptions: {
          data: {
            updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss')
          }
        }
      }
    ]
  })
}
